#ifndef __GAMESTATEMACHINE_H__
#define __GAMESTATEMACHINE_H__

#include "GameStateEnums.h"
#include <vector>
#include <deque>

namespace lj
{
	class GameState;
}

namespace lj
{
	class GameStateMachine
	{
	public:
		GameStateMachine();
		~GameStateMachine();

		void AddGameState(lj::GameState* gameState);
		void QueueGameState(lj::EGameState gameState);
		void SwitchToGameState(lj::EGameState gameState);

		void Update();

		lj::GameState* GetGameStateById(lj::EGameState gameStateId);

	private:
		void ActivateState(lj::EGameState toState);

	private:
		std::vector<lj::GameState*> m_RegisteredGameStates;
		std::deque<lj::EGameState> m_QueuedStates;

		lj::GameState* m_CurrentGameState;
	};
}

#endif